<?php
	
	include '../common.php';
	$a = $_GET['a'];
	$id = $_GET['id'];
	
	switch($a){
		case 'del':
			$sql = "delete from ".PRE."comment where id='{$id}'";
			mysql_query($sql);
			header('location:'.$_SERVER['HTTP_REFERER']);
			break;
			
		case 'dis':
			$dis = $_GET['dis'];
			$sql = "update ".PRE."comment set display='{$dis}' where id='{$id}'";
			mysql_query($sql);
			header('location:'.$_SERVER['HTTP_REFERER']);
			break;
	
	}
?>
